package com.kanqiubao.kq.utils;


import android.app.Activity;
import android.view.View;
import android.view.animation.Animation;
import android.view.animation.AnimationUtils;

import com.kanqiubao.kq.R;


public class ActivityStartAndFinshAnimation {

	public static void ActivityStartAnimation(Activity activity) {
		activity.overridePendingTransition(R.anim.push_left_in,
				R.anim.push_left_out);
	}

	public static void ActivityFinish(Activity activity) {
		activity.overridePendingTransition(R.anim.push_right_in,
				R.anim.push_right_out);
	}
	/**
	 * 下一步
	 * @param v
	 * @param next
	 * @param ac
	 */
	public static void startShowNextAnimation(View v,View next, Activity ac) {
		Animation ani = AnimationUtils.loadAnimation(ac, R.anim.push_left_in);
		next.setAnimation(ani);
		Animation ani1 = AnimationUtils.loadAnimation(ac, R.anim.push_left_out);
		v.setAnimation(ani1);
	}
	/**
	 * 上一步
	 * @param v
	 * @param ac
	 */
	public static void startShowTopAnimation(View v,View v2, Activity ac) {
		Animation ani = AnimationUtils.loadAnimation(ac, R.anim.push_right_in);
		v.setAnimation(ani);
		Animation ani1 = AnimationUtils.loadAnimation(ac, R.anim.push_right_out);
		v2.setAnimation(ani1);
	}
	
}
